package com.cx.zhshopping.ui.adapter;


import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;

import java.util.List;


public class FragAdapter extends FragmentStatePagerAdapter
{

	private List<Fragment> mFragments;

	public FragAdapter(FragmentManager fm, List<Fragment> fragments)
	{
		super(fm);
		mFragments = fragments;
	}

	@Override
	public Fragment getItem(int arg0)
	{
		return mFragments.get(arg0);
	}

	@Override
	public int getCount()
	{
		return mFragments.size();
	}

}